package com.iraeta.service.hik.impl;

import com.iraeta.dao.main.hik.WeiXinLiZhiMapper;
import com.iraeta.entity.main.WeiXinLiZhi;
import com.iraeta.service.hik.IWeiXinLiZhiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * 微信离职Service业务层处理
 * 
 * @author 陈宾
 * @date 2023-10-06
 */
@Service
public class WeiXinLiZhiServiceImpl implements IWeiXinLiZhiService
{
    @Autowired
    private WeiXinLiZhiMapper weiXinLiZhiMapper;

    /**
     * 查询微信离职
     * 
     * @param id 微信离职主键
     * @return 微信离职
     */
    @Override
    public WeiXinLiZhi selectWeiXinLiZhiById(Long id)
    {
        return weiXinLiZhiMapper.selectWeiXinLiZhiById(id);
    }

    /**
     * 查询微信离职列表
     * 
     * @param weiXinLiZhi 微信离职
     * @return 微信离职
     */
    @Override
    public List<WeiXinLiZhi> selectWeiXinLiZhiList(WeiXinLiZhi weiXinLiZhi)
    {
        return weiXinLiZhiMapper.selectWeiXinLiZhiList(weiXinLiZhi);
    }

    /**
     * 查询微信离职列表
     * @return 微信离职
     */
    @Override
    public List<WeiXinLiZhi> selectTopWeiXinLiZhi()
    {
        return weiXinLiZhiMapper.selectTopWeiXinLiZhi();
    }

    /**
     * 新增微信离职
     * 
     * @param weiXinLiZhi 微信离职
     * @return 结果
     */
    @Override
    public int insertWeiXinLiZhi(WeiXinLiZhi weiXinLiZhi)
    {
        weiXinLiZhi.setCreateTime(new Date());
        return weiXinLiZhiMapper.insertWeiXinLiZhi(weiXinLiZhi);
    }

    /**
     * 修改微信离职
     * 
     * @param weiXinLiZhi 微信离职
     * @return 结果
     */
    @Override
    public int updateWeiXinLiZhi(WeiXinLiZhi weiXinLiZhi)
    {
        weiXinLiZhi.setUpdateTime(new Date());
        return weiXinLiZhiMapper.updateWeiXinLiZhi(weiXinLiZhi);
    }

    /**
     * 批量删除微信离职
     * 
     * @param ids 需要删除的微信离职主键
     * @return 结果
     */
    @Override
    public int deleteWeiXinLiZhiByIds(Long[] ids)
    {
        return weiXinLiZhiMapper.deleteWeiXinLiZhiByIds(ids);
    }

    /**
     * 删除微信离职信息
     * 
     * @param id 微信离职主键
     * @return 结果
     */
    @Override
    public int deleteWeiXinLiZhiById(Long id)
    {
        return weiXinLiZhiMapper.deleteWeiXinLiZhiById(id);
    }
}
